Skip to main content

Create Event

POST /day/event

Description

Creates a day event for the authenticated user.

Request Parameters

Requires Authentication: true

BODY

NameTypeRequiredDescription
titlestringYesEvent title.
descriptionstringNoOptional event description.
privacystringNopublic, private, or close friends.
dateStartstringYesStart date/time as an ISO string.
dateEndstringYesEnd date/time as an ISO string. Must be after dateStart.
placeIdstringNoOptional place reference stored with the event.

Usage Example

await axios.post(
"https://api.daykeeper.app/day/event",
{
title: "Dinner with friends",
description: "At the new place downtown",
privacy: "close friends",
dateStart: "2026-03-18T19:00:00.000Z",
dateEnd: "2026-03-18T21:00:00.000Z"
},
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
)

Success Response

{
"message": "Day Event created successfully",
"data": {
"_id": "67d9c0d4cc9e4db02fca1001",
"title": "Dinner with friends",
"description": "At the new place downtown",
"privacy": "close friends",
"dateStart": "2026-03-18T15:00:00-04:00",
"dateEnd": "2026-03-18T17:00:00-04:00"
}
}

Error Response

CodeDescription
400Missing or invalid required fields
401Missing or invalid access token
413Title or description too long
500Server error